﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<%@ Import Namespace="OAclient.Common" %>

<script type="text/javascript">

</script>

<div id="wfcurtasklist">
    <p>
        待办审批</p>
    <div>
        <table>
            <tr class="alt-row">
                <th>
                    审批单名称
                </th>
                <th>
                    申请人
                </th>
                <th>
                    委托人
                </th>
                <th>
                    申请时间
                </th>
                <th>
                    操作
                </th>
            </tr>
            <%
                System.Data.DataTable dt_delegtask = ViewData["dt_delegtask"] as System.Data.DataTable;
                if (dt_delegtask != null && dt_delegtask.Rows.Count > 0)
                {
                    for (int i = 0; i < dt_delegtask.Rows.Count; i++)
                    {
            %>
            <tr>
                <td>
                    <%=dt_delegtask.Rows[i]["流程名称"]%>
                </td>
                <td>
                    <%=dt_delegtask.Rows[i]["发起人"]%>
                </td>
                <td>
                    <%=dt_delegtask.Rows[i]["委托人"]%>
                </td>
                <td>
                    <%=DateTime.Parse(dt_delegtask.Rows[i]["开始时间"].ToString()).ToString("yyyy-MM-dd HH:mm")%>
                </td>
                <td>
                    <%=Ajax.ActionLink("审批", "WFProcess",
                                new
                                {
                                    uniqueid = dt_delegtask.Rows[i]["实例标识"],
                                    task_id = dt_delegtask.Rows[i]["任务编码"],
                                    ptask_id = dt_delegtask.Rows[i]["父级编码"]
                                }, new AjaxOptions { UpdateTargetId = "workarea", OnSuccess = "intityUserTree_WF" })%>
                </td>
            </tr>
            <%
                }
                }
                else
                { %>
            <tr>
                <td colspan="0" style="text-align: center;">
                    当前无数据！
                </td>
            </tr>
            <%} %>
        </table>
    </div>
    <div id="pageLink">
        
        <%var pageInfo = ViewData["pageInfo"] as PagingInfo;%>
        <%if (pageInfo != null)
          {%>
        <%=Ajax.PageLinks(pageInfo,index => Url.Action("WFCurTaskList",new{page = index}),new AjaxOptions{UpdateTargetId="wfcurtasklist"}) %>
        <%} %>
    </div>
</div>
